<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>修改单位</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="${request.contextPath}/layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="${request.contextPath}/layuiadmin/style/admin.css" media="all">
	</head>

	<body>
		<form class="layui-form">
			<div class="layui-fluid">
				<div class="layui-row layui-col-space15">
					<div class="layui-col-md12">
						<div class="layui-card">
							<div class="layui-card-header">修改单位</div>
							<div class="layui-form-item">
							</div>
							<input type="hidden" value="${company.id?c}" name="id">
							<input type="hidden" value="1" name="requestSource">
							<div class="layui-form" lay-filter="">
								<div class="layui-form-item">
									<label class="layui-form-label">营业执照名称：</label>
									<div class="layui-input-inline">
										<input type="text" name="zhiZhao" value="${company.zhiZhao}" class="layui-input" style="width: 300px" placeholder="请输入营业执照名称">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">单位简称：</label>
									<div class="layui-input-inline">
										<input type="text" name="name" value="${company.name}" class="layui-input" style="width: 300px" placeholder="请输入单位简称">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">所在城市：</label>
									<div class="layui-input-inline">
										<select name="provinceId" lay-filter="provinceId" class="provinceId">
											<option value="">请选择所在省</option>
										</select>
									</div>
									<div class="layui-input-inline">
										<select name="cityId" lay-filter="cityId" disabled>
											<option value="" selected>请选择所在市</option>
										</select>
									</div>
									<div class="layui-input-inline">
										<select name="areaId" lay-filter="areaId" disabled>
											<option value="" selected>请选择所在区</option>
										</select>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">学校/机构：</label>
									<div class="layui-input-inline">
										<input type="radio" name="companyType" value="0" title="学校"  <#if company.companyType=='XUEXIAO'>checked</#if>>
										<input type="radio" name="companyType" value="1" title="机构"  <#if company.companyType=='JIGOU'>checked</#if>>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">有效标志：</label>
									<div class="layui-input-inline">
										<input type="radio" name="status" value="true" title="有效"  <#if company.status == true>checked</#if>>
										<input type="radio" name="status" value="false" title="无效"  <#if company.status == false>checked</#if>>
									</div>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block" style="padding-bottom: 10px;">
									<button class="layui-btn" lay-submit lay-filter="addSubmit">提交</button>
									<input type="button" class="layui-btn layui-btn-primary" onclick="javascript:history.back(-1);" value="返回"></input>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>

		<script src="${request.contextPath}/layuiadmin/layui/layui.js"></script>
		<script>
			layui.config({
					base: '${request.contextPath}/layuiadmin/' //静态资源所在路径
				}).extend({
					index: 'lib/index' //主入口模块
					,address : 'address'
				}).use(['index', 'set', 'form', 'jquery' ,'address'], function() {
					var form = layui.form
					,address = layui.address();
					var $ = layui.$;
					form.on('submit(addSubmit)', function(data) {
						$.ajax({
							type: 'put',
							url: '/company/',
							contentType: 'application/json;charset=utf-8',
							data: JSON.stringify(data.field),
							dataType: 'json',
							success: function(result, status, xhr) {
								layer.msg('修改成功', {icon: 1,offset: '200px',shade: 0.3,time: 1000}, function(){
					              location.href="companyList";
					            });
								
							}
						});
						return false;
					});
				});
		</script>
	</body>

</html>